package com.bootcamp.mall.dao;

import com.bootcamp.mall.model.Admin;
import com.bootcamp.mall.model.bo.admin.ChangeAdminPwdBO;
import com.bootcamp.mall.model.vo.admin.AdminLoginInfoVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 具体实现类有mybatis动态代理自动生成
 *
 * @date 11/8/2021 21:03
 */
public interface AdminDao {
    AdminLoginInfoVO selectAdminByEmailAndPass(Admin admin);

    List<Admin> selectAllAdmins();

    Integer insertAdmins(Admin admin);

    Admin selectAdminsById(Integer id);

    Integer updateInfoById(Admin admin);

    Integer deleteAdminsById(Integer id);

    List<Admin> selectAdminsByUsernameAndNickname(@Param("username") String username, @Param("nickname") String nickname);

    Integer updatePwdByUsername(ChangeAdminPwdBO adminBO);
}
